<!--<?php
print<<<EF
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="templates/msystem/ljy.css" rel="stylesheet" type="text/css" />
<link href="ljy.css" rel="stylesheet" type="text/css" />
</head>

<base target="_self" />
<body style="text-align:left">
<div id="toppath">友情链接站点管理<a href="friendlink.php?action=add">添加网站</a></div> 

<form name="form2" method="post" action="friendlink.php?action=switch">
<table style=" float:left;" width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<th align="center" valign="middle" bgcolor="#F0F0F0">友情链接显示控制</th>
<th align="center" valign="middle" bgcolor="#F0F0F0"></th>
</tr>
<tr>
<!-- 
EF;
$switch=array('BT下载站','视频网站');
$ll=0;
foreach($str as $list)
{
	$sta="";
	$sta1="";
	$display="";
	if($str[$ll]=='1')
	{
		$sta=" checked=\"checked\" ";
		$sta1="";
	}
	else
	{
		$sta1=" Checked=\"checked\" ";
		$sta="";
	}
print<<<EF
-->
<td width="50%" align="center" valign="middle" bgcolor="#F0F0F0">{$switch[$ll]}</td>
<td width="50%" align="center" valign="middle">
	<div align="center">
        <label>
        <input name="status{$ll}" type="radio" value="1" {$sta} />
		<span style="color:'blue'">开启</span>
        </label>
		<label>
        <input type="radio" name="status{$ll}" value="0"  {$sta1} />
		<span style="color:'red'">禁止</span>
        </label>
     </div>
</td>
</tr>
<!-- 
EF;
$ll++;
}
print<<<EF
-->
</table>
  <div align="center">
	<input name="update" type="submit" class="submit" id="update" value="更新操作" />
		        &nbsp;&nbsp;&nbsp;	
	<input name="cancal" type="reset" class="submit" id="cancal"  value="重置" />	  
  </div>
 </form>

<table style=" float:left;" width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="#FFFFFF">

  <tr>
<th align="center" valign="middle" bgcolor="#F0F0F0">网站ID</th>
<th align="center" valign="middle" bgcolor="#F0F0F0">网站地址</th>
<th align="center" valign="middle" bgcolor="#F0F0F0">所属类别</th>
<th align="center" valign="middle" bgcolor="#F0F0F0">操作</th>
  </tr>
<!--
EF;
foreach($friendlinklist as $list){
'0'==$list[ascription]?$list[ascription]='BT下载':'';
'1'==$list[ascription]?$list[ascription]='视频网站':'';
print<<<EF
-->
  <tr>
<td width="10%" align="center" valign="middle" bgcolor="#F0F0F0">$list[id]</td>
<td width="30%" align="center" valign="middle" bgcolor="#F0F0F0">$list[url]</td>
<td width="30%" align="center" valign="middle" bgcolor="#F0F0F0">{$list[ascription]}</td>
<td width="30%" align="center" valign="middle" bgcolor="#F0F0F0">
<a href="friendlink.php?action=edit&amp;id={$list[id]}">编辑</a>&nbsp;|&nbsp;<a href="friendlink.php?action=delete&amp;id={$list[id]}">删除</a>
</td>
  </tr>
<!-- 
EF;
}
print<<<EF
-->
</table>
<div style="text-align:center;margin:5px auto;">{$pages}</div>
</body>
</html>
<!--
EF;
?>
-->